<template>
    <el-config-provider :locale="locale" :size="size">
        <router-view></router-view>
    </el-config-provider>
</template>

<script lang="ts">
import {defineComponent, computed} from 'vue'
import zhCn                        from 'element-plus/dist/locale/zh-cn.mjs'

import {useStore} from 'vuex'

export default defineComponent({
    name: 'App',
    setup() {
        const store  = useStore()
        const locale = computed(() => (zhCn))
        const size   = computed(() => store.state.app.elementSize)

        return {
            locale,
            size,
        }
    }
})
</script>

<style>
#app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    width: 100%;
    height: 100vh;
}
</style>
